package cn.stronglink.asset.module.space.vo;

public class SpaceVo implements Comparable<SpaceVo>{

	private Long	rackId;
	private String	assetName;
	private String	roomName;
	private Integer uHeight;
	private Integer usedNums;
	private Integer restNums;
	private Integer start;
	private Integer end;
	private Integer nums;//区间数
	public Long getRackId() {
		return rackId;
	}
	public String getRackId_() {
		return rackId==null?"":rackId+"";
	}
	public void setRackId(Long rackId) {
		this.rackId = rackId;
	}
	public String getAssetName() {
		return assetName;
	}
	public void setAssetName(String assetName) {
		this.assetName = assetName;
	}
	public String getRoomName() {
		return roomName;
	}
	public void setRoomName(String roomName) {
		this.roomName = roomName;
	}
	public Integer getuHeight() {
		return uHeight;
	}
	public void setuHeight(Integer uHeight) {
		this.uHeight = uHeight;
	}
	public Integer getUsedNums() {
		return usedNums;
	}
	public void setUsedNums(Integer usedNums) {
		this.usedNums = usedNums;
	}
	public Integer getRestNums() {
		return uHeight==null?0:usedNums==null?uHeight:uHeight-usedNums;
	}
	public void setRestNums(Integer restNums) {
		this.restNums = restNums;
	}
	public Integer getStart() {
		return start;
	}
	public void setStart(Integer start) {
		this.start = start;
	}
	public Integer getEnd() {
		return end;
	}
	public void setEnd(Integer end) {
		this.end = end;
	}
	public Integer getNums() {
		return nums;
	}
	public void setNums(Integer nums) {
		this.nums = nums;
	}
	
	@Override
    public int compareTo(SpaceVo o) {
        // TODO Auto-generated method stub
        if(this.nums>o.getNums()){
            return -1;
        }
        else if(this.nums<o.getNums()){
            return 1;
        }
        else{
            return 0;
        }
    }
}
